import java.util.Scanner;

/**
 * @author wang'ji'cheng
 * @date 2025/7/19
 */
public class StringBuilderDemo1 {
    public static void main(String[] args) {

        StringBuilder sb = new StringBuilder();

        Scanner scanner = new Scanner(System.in);
        System.out.println("请输入一个字符串");
        String str = scanner.next();
        String reString = sb.append(str).reverse().toString();
        if (str.equals(reString)){
            System.out.println("是回文");
        }else {
            System.out.println("不是回文");
        }

    }
}
